x86/viridan: Clean up Viridian MSR infrastructure
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 20 Sep 2017 17:33:59 +0000 (17:33 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 24 Sep 2018 15:25:37 +0000 (16:25 +0100)
commit229b94878717e22c0f228625bbcddd53f7d8654d
treed7fc816eeaf6234ec7e8f7d04bf942f6913ffcce
parentbd7099a674819c0709bd058793adea2e76b42a6b
x86/viridan: Clean up Viridian MSR infrastructure

Rename the functions to guest_{rd,wr}msr_viridian() for consistency, and
because the _regs() suffix isn't very appropriate.

Update them to take a vcpu pointer rather than presuming that they act on
current, which is safe for all implemented operations, and switch their return
ABI to use X86EMUL_*.

The default cases no longer need to deal with MSRs out of the Viridian range,
but drop the printks to debug builds only and identify the value attempting to
be written.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/viridian.c
xen/arch/x86/msr.c
xen/include/asm-x86/hvm/viridian.h